/*
 * Copyright (c) 2020, 2023, keyila All rights reserved.
 *
 */
package com.clp.study.designPattern.strategyPattern.demo;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author clp
 * @version 1.0
 */
@Component
public class PayHandlerDemo {

    @Resource
    private PayFactory payFactory;

    public void dealPay(int code){
        PayHandler payHandler = payFactory.getHandlerByCode(code);
        payHandler.dealPay();
    }
}
